import React from 'react'
import {  NavLink } from 'react-router-dom'

function Websw(Com) { 
    const token=localStorage.getItem('token')
  return ()=>{
    if(token){
        return <Com></Com>
    }else{
        return <NavLink to='/login'></NavLink>
    }
  }
}

export default Websw